<template>
  <div class="about">
    <h1>This is an about page</h1>
    <button @click="login">login</button>
  </div>
</template>
<script setup>
import { useRoute } from 'vue-router'
import { ref } from 'vue'
import { useStore } from 'vuex'

const route = useRoute() // $route
let id = route.query.id ? route.query.id : ''
console.log('id', id)

const store = useStore()
console.log(store.state.isLogin)

let username = ref('wqw')
let password = ref('123')
const login = () => {
  store.dispatch('login', { username, password })
}
</script>
